	// Iframe 框架
	var Iframe=function(selector){
		this.selector=selector;
		this.element=$(selector).get(0);
	}
	Iframe.prototype=new Control();
	Iframe.prototype.init=function(){
		var self=this;
		this.seamless=$(this.element).attr("seamless");
		if(this.element.src.indexOf("%7B")!="-1"){
			return false;
		}
		if(typeof(this.seamless)!="undefined"){
			this.timer=setInterval(function(){self.update()},100);
			return ;
			//兼容点设置地方
			if(!!document.addEventListener){
				//$(this.element).load(function(event){self.loadCompleteHandle(event);});
				$(this.element).bind("load",function(event){self.loadCompleteHandle(event);});
				//console.log("its up ie8")
			}else{
				this.timer=setInterval(function(){self.update()},100);
				//console.log("its not up ie8")
			}
			//2015.11.24
		}
	}
	Iframe.prototype.loadCompleteHandle=function(event){
		this.adaptiveHeight();
	}
	Iframe.prototype.adaptiveHeight=function(){
		var self=this;
		this.bodyElement=$(this.element).contents().find("body").get(0);
		var height=$(this.bodyElement).outerHeight()
		this.element.style.height=height+"px";
		//console.log("进入了我想走进来的道路");
		$(this.bodyElement).bind("DOMNodeInserted",function(event){
			//var height=$(event.currentTarget).outerHeight()
			var height=$(event.currentTarget).get(0).scrollHeight
			self.element.style.height=height+"px";
		})
		$(this.bodyElement).bind("DOMNodeRemoved",function(event){
			//var height=$(event.currentTarget).outerHeight()
			$(event.currentTarget).css("height","auto");
			$(event.currentTarget).parent("html").css("height","auto");
			var height=$(event.currentTarget).height();
			$(self.element).css("height",height+"px");
		})
	}
	Iframe.prototype.update=function(){
		if(this.element.contentWindow.document.body!=null){
			$(this.element).contents().find("body").css("height","auto");
			$(this.element).contents().find("html").css("height","auto");
			scrollHeight=$(this.element).contents().find("body").height();
			//this.element.contentWindow.document.body.scrollHeight
			//console.log(scrollHeight);
			//this.element.style.height=scrollHeight+"px";
			$(this.element).css("height",scrollHeight+"px")
		}
	}
	HTMLTurbo.control.Iframe=Iframe